﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Configuration;

namespace Options.IBClient.Component
{
    public class Log
    {
        private static string GetPath()
        {
            string path = Common.LogFile;
            return path;
        }

        public static void LogMessage(string message)
        {
            //Object thisLock = new Object();
            //SqlHelper helper = new SqlHelper();
            //helper.AddLog(message);
            //using (StreamWriter w = File.AppendText(GetPath() + "IBlog.txt"))
            //{
            //    WriteLog(message, w);
            //}
        }


        private static void WriteLog(string logMessage, TextWriter w)
        {

            w.Write("\r\nLog Entry : ");
            w.WriteLine("{0} {1}", DateTime.Now.ToLongTimeString(),
                DateTime.Now.ToLongDateString());
            w.WriteLine("  :");
            w.WriteLine("  :{0}", logMessage);
            w.WriteLine("-------------------------------");
        }


    }
}
